1. Field of the Invention
The present invention relates to a data processing apparatus and, more particularly, to an apparatus that transmits and receives data to and from an external device.
2. Description of the Related Art
A data communication system used in data transmission and reception between different media in accordance with sampling rates based on different system clocks is disclosed in, for example, Japanese Patent Laid-Open No. 2003-179662. In this data communication system, the difference between the clock of a master and the clock of a slave is calculated based on the received packet timestamp, and a transfer-rate change message having the calculated value as the data for changing the transfer rate is generated and the generated message is transmitted to the slave. The slave absorbs the difference in clock between the master and the slave by changing the transfer rate in accordance with the transfer-rate change message in order to avoid buffer over-run and buffer under-run.
However, known transfer interfaces in which the slave responds to a transfer request from the master, as in a universal serial bus (USB) interface, and in which the packet size cannot be arbitrarily reset for every packet cannot completely avoid the buffer over-run and under-run.